package com.qs.education.controller;

import org.apache.log4j.Logger;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.qs.education.bean.api.ResponseListBean;
import com.qs.education.bean.beans.EducationClassBean;
import com.qs.education.service.IClassService;

/**
 * 
 * @class ClassController
 * @author Jason
 * @description
 * @date Nov 9, 2018 3:34:05 PM
 */
@Controller
public class ClassController {

	@Autowired
	private IClassService iClassService;
	
	private final Logger log = Logger.getLogger(this.getClass());
	/**
	 * @Description 查询所有班级
	 * @author Jason
	 * @date Nov 7, 2018
	 * @return
	 */
	@RequiresPermissions(value={"user:view"})
	@RequestMapping("/getClass")
	public ModelAndView getClassList(){
		
		log.info("后台管理-->查询所有班级");
		ModelAndView mv=new ModelAndView("class/list");
		ResponseListBean<EducationClassBean> educationClassList =  iClassService.getClassList();
		mv.addObject("educationClassList", educationClassList);
		
		return mv;
	}
}
